﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListTours.aspx.cs" Inherits="HolidayWeb.ListTours" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="toursDiv" runat="server"></div>
<hr />
<h3>Filter:</h3>
    Destination: 
    <asp:TextBox ID="DestinationBox" runat="server"></asp:TextBox>
    <br />
    Price: from 
    <asp:TextBox ID="PriceFromBox" runat="server"></asp:TextBox>
    to
    <asp:TextBox ID="PriceToBox" runat="server"></asp:TextBox>
    <br />
    Date: from
    <asp:TextBox ID="DateFromBox" runat="server"></asp:TextBox>
    to
    <asp:TextBox ID="DateToBox" runat="server"></asp:TextBox>
    <asp:Button ID="FilterButton" runat="server" Text="Filter" 
        onclick="FilterButton_Click" />
<hr />
<h3>Results:</h3>
    <asp:Repeater ID="ToursRepeater" runat="server"  >
      <ItemTemplate>
          <div style="padding:20px;">
          Destination: <%# Eval("DestinationName") %><br />
          Price: <%# Eval("Price") %><br/>
          Date: <%# Eval("StartDate") %> - <%# Eval("EndDate") %><br />
          <a href="ViewDetails.aspx?DestinationId=<%# Eval("DestinationId") %>">View details</a>
          </div>
      </ItemTemplate>
    </asp:Repeater>
</asp:Content>
